import request from '@/utils/request'

// 列表
export const getWarehousePage = (params) => {
  return request({
    url: '/warehouse/page',
    params
  })
}
// 编号
export const getCodeFactory = () => {
  return request({
    url: '/codeFactory/next/CK'
  })
}

// 新增
export const addWarehuose = (data) => {
  return request({
    url: '/warehouse',
    method: 'POST',
    data
  })
}
// 编辑
export const editWarehuose = (id) => {
  return request({
    url: `/warehouse/${id}`
  })
}
// 修改
export const modifyWareHuose = (data) => {
  return request({
    url: '/warehouse',
    method: 'PUT',
    data
  })
}
// 删除
export const deleteyWareHuose = (id) => {
  return request({
    url: `/warehouse?ids[]=${id}`,
    method: 'DELETE'

  })
}
